package com.sara.dao;

import com.sara.entity.Admin;
import com.sara.util.DbHelp;
import org.apache.commons.dbutils.BasicRowProcessor;
import org.apache.commons.dbutils.GenerousBeanProcessor;
import org.apache.commons.dbutils.handlers.BeanHandler;

public class AdminDao {


    public Admin findAdminByName(String adminName) {
        String sql = "select * from t_admin where admin_name = ?";
        return DbHelp.query(sql, new BeanHandler<Admin>(Admin.class, new BasicRowProcessor(new GenerousBeanProcessor())), adminName);

    }
}
